FROM python:3.13-slim


WORKDIR /root

COPY . .
# 写入新的源地址

RUN cat <<EOF > /etc/apt/sources.list
deb http://mirrors.aliyun.com/debian/ bookworm main contrib non-free non-free-firmware
deb http://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free non-free-firmware
deb http://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free non-free-firmware
deb http://mirrors.aliyun.com/debian-security bookworm-security main contrib non-free non-free-firmware
EOF


# 确保文件权限正确
RUN chmod 644 /etc/apt/sources.list

RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install --upgrade pip setuptools
RUN pip install --no-cache-dir mkdocs>=1.6.1 mkdocs-material>=9.6.12

RUN mkdocs new /root/workspace

EXPOSE 8000
# 设置时区为东八区
ENV TZ=Asia/Shanghai


CMD ["mkdocs server"]
